﻿<phone:PhoneApplicationPage
    x:Class="MusicAlarm7.AddNotification"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:viewmod="clr-namespace:MusicAlarm7.DataModel;assembly=DataModel"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True" d:DesignHeight="768" d:DesignWidth="480">

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Language="zh-cn" Background="Transparent">
        <Grid.Resources>
            <viewmod:RecurringDaysConverter x:Key="RecurringDaysConverter" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="{Binding Source={StaticResource LocalizedStrings}, Path=LocalizedResources.AppTitle}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Name="PageTitleBlock" Text="" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ScrollViewer>
                <StackPanel Orientation="Vertical">
                    <TextBlock Height="30" HorizontalAlignment="Left" Name="beginTimeLabel" Text="{Binding Source={StaticResource LocalizedStrings}, Path=LocalizedResources.EditPage_Time}"/>
                    <toolkit:TimePicker x:Name="timePicker" Value="{Binding AlarmTime, Mode=TwoWay}" />
                    <TextBlock Height="30" HorizontalAlignment="Left"  Name="cycleLabel" Text="{Binding Source={StaticResource LocalizedStrings}, Path=LocalizedResources.EditPage_Cycle}"/>
                    <toolkit:RecurringDaysPicker Name="recurringDays"
                                                 SelectedItems="{Binding RecurringDays, Converter={StaticResource RecurringDaysConverter}, Mode=TwoWay}" 
                                                 HorizontalAlignment="Left" Width="460" 
                                                 AllowDrop="False" SelectedIndex="0" />
                    <TextBlock Height="30" HorizontalAlignment="Left"  Name="musicLabel" Text="{Binding Source={StaticResource LocalizedStrings}, Path=LocalizedResources.EditPage_Music}" />
                    <toolkit:ListPicker Name="musicPicker" HorizontalAlignment="Left" Width="460"
                                        ItemsSource="{Binding Path=Musics, Source={StaticResource AlarmViewModel}, Mode=OneTime}"
                                        SelectedIndex="{Binding Path=Music/Id, Mode=TwoWay}" />
                    <TextBlock Height="30" Name="contentLabel" HorizontalAlignment="Left" Text="{Binding Source={StaticResource LocalizedStrings}, Path=LocalizedResources.EditPage_Content}" />
                    <TextBox Height="160" Name="contentText" Text="{Binding Content, Mode=TwoWay}" HorizontalAlignment="Left" Width="460" TextWrapping="Wrap" MaxLength="256" AcceptsReturn="True" />
                </StackPanel>
            </ScrollViewer>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>